|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.bridge.UserAgentAdapter
org.jvnet.flamingo.svg.SvgBatikResizableIcon
public class SvgBatikResizableIcon
SVG-based implementation of ResizableIcon based on Apache Batik
library.
| Nested Class Summary | |
|---|---|
static class |
SvgBatikIcon.BufferedImageTranscoder
A transcoder that generates a BufferedImage. |
| Method Summary | |
|---|---|
void |
addAsynchronousLoadListener(AsynchronousLoadListener l)
Adds listener on the asynchronous loading events. |
void |
addGVTTreeRendererListener(org.apache.batik.swing.gvt.GVTTreeRendererListener l)
Adds a GVTTreeRendererListener to this GVTTreeRenderer. |
void |
fireEvent(org.apache.batik.util.EventDispatcher.Dispatcher dispatcher,
java.lang.Object event)
Fires event. |
int |
getIconHeight()
|
int |
getIconWidth()
|
byte[] |
getSvgBytes()
Returns the SVG bytes of the loaded SVG image. |
static SvgBatikResizableIcon |
getSvgIcon(java.io.InputStream inputStream,
java.awt.Dimension initialDim)
Returns the icon for the specified input stream. |
static SvgBatikResizableIcon |
getSvgIcon(java.net.URL location,
java.awt.Dimension initialDim)
Returns the icon for the specified URL. |
static SvgBatikResizableIcon |
getSvgzIcon(java.io.InputStream inputStream,
java.awt.Dimension initialDim)
Returns the icon for the specified input stream. |
static SvgBatikResizableIcon |
getSvgzIcon(java.net.URL location,
java.awt.Dimension initialDim)
Returns the icon for the specified URL. |
java.awt.geom.Dimension2D |
getViewportSize()
Returns the default size of this user agent. |
boolean |
isLoading()
Returns indication whether the content is still loading. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
void |
removeAsynchronousLoadListener(AsynchronousLoadListener l)
Removes listener on the asynchronous loading events. |
void |
removeGVTTreeRendererListener(org.apache.batik.swing.gvt.GVTTreeRendererListener l)
Removes a GVTTreeRendererListenerner from this
GVTTreeRenderer. |
void |
revertToOriginalDimension()
|
void |
setDimension(java.awt.Dimension dim)
Changes the dimension of this icon. |
void |
setHeight(int height)
|
void |
setPreferredSize(java.awt.Dimension dim)
Sets the preferred size for this icon. |
void |
setWidth(int width)
|
| Methods inherited from class org.apache.batik.bridge.UserAgentAdapter |
|---|
addStdFeatures, checkLoadExternalResource, checkLoadScript, deselectAll, displayError, displayError, displayMessage, getAlternateStyleSheet, getBolderFontWeight, getBrokenLinkDocument, getClientAreaLocationOnScreen, getDefaultFontFamily, getEventDispatcher, getExternalResourceSecurity, getLanguages, getLighterFontWeight, getMedia, getMediumFontSize, getPixelToMM, getPixelUnitToMillimeter, getScriptSecurity, getStandardBolderFontWeight, getStandardLighterFontWeight, getTransform, getUserStyleSheetURI, getXMLParserClassName, handleElement, hasFeature, isXMLParserValidating, openLink, registerExtension, runThread, setBridgeContext, setSVGCursor, setTextSelection, setTransform, showAlert, showConfirm, showPrompt, showPrompt, supportExtension |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.Icon |
|---|
getIconHeight, getIconWidth, paintIcon |
| Method Detail |
|---|
public static SvgBatikResizableIcon getSvgIcon(java.net.URL location,
java.awt.Dimension initialDim)
location - Icon URL.initialDim - Initial dimension of the icon.
public static SvgBatikResizableIcon getSvgIcon(java.io.InputStream inputStream,
java.awt.Dimension initialDim)
inputStream - Icon stream.initialDim - Initial dimension of the icon.
public static SvgBatikResizableIcon getSvgzIcon(java.net.URL location,
java.awt.Dimension initialDim)
location - Icon URL.initialDim - Initial dimension of the icon.
public static SvgBatikResizableIcon getSvgzIcon(java.io.InputStream inputStream,
java.awt.Dimension initialDim)
inputStream - Icon stream.initialDim - Initial dimension of the icon.
public void revertToOriginalDimension()
public void setDimension(java.awt.Dimension dim)
ResizableIconthis icon.
setDimension in interface ResizableIcondim - New dimension for this icon.public void setHeight(int height)
public void setWidth(int width)
public void addAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
addAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to add.public void removeAsynchronousLoadListener(AsynchronousLoadListener l)
AsynchronousLoading
removeAsynchronousLoadListener in interface AsynchronousLoadingl - Listener to remove.public boolean isLoading()
AsynchronousLoading
isLoading in interface AsynchronousLoadingtrue if the content is still loading,
false otherwise.public int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Icon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic java.awt.geom.Dimension2D getViewportSize()
getViewportSize in interface org.apache.batik.bridge.UserAgentgetViewportSize in class org.apache.batik.bridge.UserAgentAdapterpublic void setPreferredSize(java.awt.Dimension dim)
this icon. The rendering is
scheduled automatically.
dim - Preferred size.public byte[] getSvgBytes()
public void fireEvent(org.apache.batik.util.EventDispatcher.Dispatcher dispatcher,
java.lang.Object event)
dispatcher - Event dispatcher.event - Event data.public void addGVTTreeRendererListener(org.apache.batik.swing.gvt.GVTTreeRendererListener l)
GVTTreeRendererListener to this GVTTreeRenderer.
l - Listener to add.public void removeGVTTreeRendererListener(org.apache.batik.swing.gvt.GVTTreeRendererListener l)
GVTTreeRendererListenerner from this
GVTTreeRenderer.
l - Listener to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||